package com.manage.dao;

import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;
import org.springframework.stereotype.Repository;

import com.manage.entity.TrainingRecord;

@Repository
public interface TrainingRecordRepository extends PagingAndSortingRepository<TrainingRecord, Long>, JpaSpecificationExecutor<TrainingRecord> {

	@Query("from TrainingRecord tr where tr.staff.id=?1 and tr.trainingCourse.id=?2")
	public TrainingRecord findRecordByStaffIdAndTrainingCourseId(Long staffId, Long trainingCourseId);

	
}
